Micron Document
`:top
In `F33f`_`[probability theory`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Probability_theory]`_`f, the `!probability generating function`! of a `F33f`_`[discrete random variable`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Discrete_random_variable]`_`f is a `F33f`_`[power series`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Power_series]`_`f representation (the `F33f`_`[generating function`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Generating_function]`_`f) of the `F33f`_`[probability mass function`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Probability_mass_function]`_`f of the `F33f`_`[random variable`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Random_variable]`_`f. Probability generating functions are often employed for their succinct description of the sequence of probabilities Pr(`*X`* = `*i`*) in the `F33f`_`[probability mass function`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Probability_mass_function]`_`f for a `F33f`_`[random variable`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Random_variable]`_`f `*X`*, and to make available the well-developed theory of power series with non-negative coefficients.

>>Contents

• `F0af`_`[Definition`#definition]`_`f
• `F0af`_`[Univariate case`#univariate-case]`_`f
• `F0af`_`[Multivariate case`#multivariate-case]`_`f
• `F0af`_`[Properties`#properties]`_`f
• `F0af`_`[Power series`#power-series]`_`f
• `F0af`_`[Probabilities and expectations`#probabilities-and-expectations]`_`f
• `F0af`_`[Functions of independent random variables`#functions-of-independent-random-variables]`_`f
• `F0af`_`[Examples`#examples]`_`f
• `F0af`_`[Related concepts`#related-concepts]`_`f
• `F0af`_`[Notes`#notes]`_`f
• `F0af`_`[References`#references]`_`f

-─

>>Definition

>>>Univariate case

If `*X`* is a `F33f`_`[discrete random variable`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Discrete_random_variable]`_`f taking values `*x`* in the non-negative `F33f`_`[integers`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Integer]`_`f {0,1, ...}, then the `*probability generating function`* of `*X`* is defined as `:cite-ref-1[`F5bf`_`[1`#cite-note-1]`_`f]

G ( z ) = E ⁡ ⁡ ( z X ) = ∑ ∑ x = 0 ∞ ∞ p ( x ) z x , {\\displaystyle G(z)=\\operatorname {E} (z^{X})=\\sum _{x=0}^{\\infty }p(x)z^{x},} where p {\\displaystyle p} is the `F33f`_`[probability mass function`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Probability_mass_function]`_`f of X {\\displaystyle X} . Note that the subscripted notations G X {\\displaystyle G_{X}} and p X {\\displaystyle p_{X}} are often used to emphasize that these pertain to a particular random variable X {\\displaystyle X} , and to its `F33f`_`[distribution`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Probability_distribution]`_`f. The power series `F33f`_`[converges absolutely`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Absolute_convergence]`_`f at least for all `F33f`_`[complex numbers`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Complex_number]`_`f z {\\displaystyle z} with | z | < 1 {\\displaystyle |z|<1} ; the radius of convergence being often larger.

>>>Multivariate case

If `*X`* = (`*X`*1,...,`*Xd`*) is a discrete random variable taking values (`*x`*1, ..., `*xd`*) in the d-dimensional non-negative `F33f`_`[integer lattice`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Integer_lattice]`_`f {0,1, ...}`*d`*, then the `*probability generating function`* of `*X`* is defined as G ( z ) = G ( z 1 , … … , z d ) = E ⁡ ⁡ ( z 1 X 1 ⋯ ⋯ z d X d ) = ∑ ∑ x 1 , … … , x d = 0 ∞ ∞ p ( x 1 , … … , x d ) z 1 x 1 ⋯ ⋯ z d x d , {\\displaystyle G(z)=G(z_{1},\\ldots ,z_{d})=\\operatorname {E} {\\bigl (}z_{1}^{X_{1}}\\cdots z_{d}^{X_{d}}{\\bigr )}=\\sum _{x_{1},\\ldots ,x_{d}=0}^{\\infty }p(x_{1},\\ldots ,x_{d})z_{1}^{x_{1}}\\cdots z_{d}^{x_{d}},} where p is the probability mass function of X. The power series converges absolutely at least for all complex vectors z = ( z 1 , . . . z d ) ∈ ∈ C d {\\displaystyle z=(z_{1},...z_{d})\\in \\mathbb {C} ^{d}} with max { | z 1 | , . . . , | z d | } ≤ ≤ 1. {\\displaystyle {\\text{max}}\\{|z_{1}|,...,|z_{d}|\\}\\leq 1.}

>>Properties

>>>Power series

Probability generating functions obey all the rules of power series with non-negative coefficients. In particular, G ( 1 − − ) = 1 {\\displaystyle G(1^{-})=1} , where G ( 1 − − ) = lim x → → 1 , x < 1 G ( x ) {\\displaystyle G(1^{-})=\\lim _{x\\to 1,x<1}G(x)} , `F33f`_`[x approaching 1 from below`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=One-sided_limit]`_`f, since the probabilities must sum to one. So the `F33f`_`[radius of convergence`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Radius_of_convergence]`_`f of any probability generating function must be at least 1, by `F33f`_`[Abel's theorem`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Abel's_theorem]`_`f for power series with non-negative coefficients.

>>>Probabilities and expectations

The following properties allow the derivation of various basic quantities related to X {\\displaystyle X} :

1. The probability mass function of X {\\displaystyle X} is recovered by taking `F33f`_`[derivatives`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Derivative]`_`f of G {\\displaystyle G} , p ( k ) = Pr ⁡ ⁡ ( X = k ) = G ( k ) ( 0 ) k ! . {\\displaystyle p(k)=\\operatorname {Pr} (X=k)={\\frac {G^{(k)}(0)}{k!}}.}
2. It follows from Property 1 that if random variables X {\\displaystyle X} and Y {\\displaystyle Y} have probability-generating functions that are equal, G X = G Y {\\displaystyle G_{X}=G_{Y}} , then p X = p Y {\\displaystyle p_{X}=p_{Y}} . That is, if X {\\displaystyle X} and Y {\\displaystyle Y} have identical probability-generating functions, then they have identical distributions.
3. The normalization of the probability mass function can be expressed in terms of the generating function by E ⁡ ⁡ [ 1 ] = G ( 1 − − ) = ∑ ∑ i = 0 ∞ ∞ p ( i ) = 1. {\\displaystyle \\operatorname {E} [1]=G(1^{-})=\\sum _{i=0}^{\\infty }p(i)=1.} The `F33f`_`[expectation`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Expected_value]`_`f of X {\\displaystyle X} is given by E ⁡ ⁡ [ X ] = G ′ ( 1 − − ) . {\\displaystyle \\operatorname {E} [X]=G'(1^{-}).} More generally, the k t h {\\displaystyle k^{th}} `F33f`_`[factorial moment`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Factorial_moment]`_`f, E ⁡ ⁡ [ X ( X − − 1 ) ⋯ ⋯ ( X − − k + 1 ) ] {\\displaystyle \\operatorname {E} [X(X-1)\\cdots (X-k+1)]} of X {\\displaystyle X} is given by E ⁡ ⁡ [ X ! ( X − − k ) ! ] = G ( k ) ( 1 − − ) , k ≥ ≥ 0. {\\displaystyle \\operatorname {E} \\left[{\\frac {X!}{(X-k)!}}\\right]=G^{(k)}(1^{-}),\\quad k\\geq 0.} So the `F33f`_`[variance`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Variance]`_`f of X {\\displaystyle X} is given by Var ⁡ ⁡ ( X ) = G ″ ( 1 − − ) + G ′ ( 1 − − ) − − [ G ′ ( 1 − − ) ] 2 . {\\displaystyle \\operatorname {Var} (X)=G''(1^{-})+G'(1^{-})-\\left[G'(1^{-})\\right]^{2}.} Finally, the k-th `F33f`_`[raw moment`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Raw_moment]`_`f of X is given by E ⁡ ⁡ [ X k ] = ( z ∂ ∂ ∂ ∂ z ) k G ( z ) | z = 1 − − {\\displaystyle \\operatorname {E} [X^{k}]=\\left(z{\\frac {\\partial }{\\partial z}}\\right)^{k}G(z){\\Big |}_{z=1^{-}}}
4. G X ( e t ) = M X ( t ) {\\displaystyle G_{X}(e^{t})=M_{X}(t)} where `*X`* is a random variable, G X ( t ) {\\displaystyle G_{X}(t)} is the probability generating function (of X {\\displaystyle X} ) and M X ( t ) {\\displaystyle M_{X}(t)} is the `F33f`_`[moment-generating function`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Moment-generating_function]`_`f (of X {\\displaystyle X} ).

>>>Functions of independent random variables

Probability generating functions are particularly useful for dealing with functions of `F33f`_`[independent`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Statistical_independence]`_`f random variables. For example:

• If X i , i = 1 , 2 , ⋯ ⋯ , N {\\displaystyle X_{i},i=1,2,\\cdots ,N} is a sequence of independent (and not necessarily identically distributed) random variables that take on natural-number values, and S N = ∑ ∑ i = 1 N a i X i , {\\displaystyle S_{N}=\\sum _{i=1}^{N}a_{i}X_{i},} where the a i {\\displaystyle a_{i}} are constant natural numbers, then the probability generating function is given by G S N ( z ) = E ⁡ ⁡ ( z S N ) = E ⁡ ⁡ ( z ∑ ∑ i = 1 N a i X i , ) = G X 1 ( z a 1 ) G X 2 ( z a 2 ) ⋯ ⋯ G X N ( z a N ) . {\\displaystyle G_{S_{N}}(z)=\\operatorname {E} (z^{S_{N}})=\\operatorname {E} \\left(z^{\\sum _{i=1}^{N}a_{i}X_{i},}\\right)=G_{X_{1}}(z^{a_{1}})G_{X_{2}}(z^{a_{2}})\\cdots G_{X_{N}}(z^{a_{N}}).}
• In particular, if X {\\displaystyle X} and Y {\\displaystyle Y} are independent random variables: G X + Y ( z ) = G X ( z ) ⋅ ⋅ G Y ( z ) {\\displaystyle G_{X+Y}(z)=G_{X}(z)\\cdot G_{Y}(z)} and G X − − Y ( z ) = G X ( z ) ⋅ ⋅ G Y ( 1 / z ) . {\\displaystyle G_{X-Y}(z)=G_{X}(z)\\cdot G_{Y}(1/z).}
• In the above, the number N {\\displaystyle N} of independent random variables in the sequence is fixed. Assume N {\\displaystyle N} is discrete random variable taking values on the non-negative integers, which is independent of the X i {\\displaystyle X_{i}} , and consider the probability generating function G N {\\displaystyle G_{N}} . If the X i {\\displaystyle X_{i}} are not only independent but also identically distributed with common probability generating function G X = G X i {\\displaystyle G_{X}=G_{X_{i}}} , then G S N ( z ) = G N ( G X ( z ) ) . {\\displaystyle G_{S_{N}}(z)=G_{N}(G_{X}(z)).} This can be seen, using the `F33f`_`[law of total expectation`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Law_of_total_expectation]`_`f, as follows: G S N ( z ) = E ⁡ ⁡ ( z S N ) = E ⁡ ⁡ ( z ∑ ∑ i = 1 N X i ) = E ⁡ ⁡ ( E ⁡ ⁡ ( z ∑ ∑ i = 1 N X i ∣ ∣ N ) ) = E ⁡ ⁡ ( ( G X ( z ) ) N ) = G N ( G X ( z ) ) . {\\displaystyle {\\begin{aligned}G_{S_{N}}(z)&=\\operatorname {E} (z^{S_{N}})=\\operatorname {E} (z^{\\sum _{i=1}^{N}X_{i}})\\\\[4pt]&=\\operatorname {E} {\\big (}\\operatorname {E} (z^{\\sum _{i=1}^{N}X_{i}}\\mid N){\\big )}=\\operatorname {E} {\\big (}(G_{X}(z))^{N}{\\big )}=G_{N}(G_{X}(z)).\\end{aligned}}} This last fact is useful in the study of `F33f`_`[Galton–Watson processes`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Galton–Watson_process]`_`f and `F33f`_`[compound Poisson processes`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Compound_Poisson_process]`_`f.
• When the X i {\\displaystyle X_{i}} are not supposed identically distributed (but still independent and independent of N {\\displaystyle N} ), we have G S N ( z ) = ∑ ∑ n ≥ ≥ 1 f n ∏ ∏ i = 1 n G X i ( z ) , {\\displaystyle G_{S_{N}}(z)=\\sum _{n\\geq 1}f_{n}\\prod _{i=1}^{n}G_{X_{i}}(z),} where f n = Pr ( N = n ) . {\\displaystyle f_{n}=\\Pr(N=n).} For identically distributed X i {\\displaystyle X_{i}} s, this simplifies to the identity stated before, but the general case is sometimes useful to obtain a decomposition of S N {\\displaystyle S_{N}} by means of generating functions.

>>Examples

• The probability generating function of an almost surely `F33f`_`[constant random variable`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Degenerate_distribution]`_`f, i.e. one with Pr ( X = c ) = 1 {\\displaystyle \\Pr(X=c)=1} and Pr ( X ≠ ≠ c ) = 0 {\\displaystyle \\Pr(X\\neq c)=0} is G ( z ) = z c . {\\displaystyle G(z)=z^{c}.}
• The probability generating function of a `F33f`_`[binomial random variable`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Binomial_distribution]`_`f, the number of successes in n {\\displaystyle n} trials, with probability p {\\displaystyle p} of success in each trial, is G ( z ) = [ ( 1 − − p ) + p z ] n . {\\displaystyle G(z)=\\left[(1-p)+pz\\right]^{n}.} `!Note`!: it is the n {\\displaystyle n} -fold product of the probability generating function of a `F33f`_`[Bernoulli random variable`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Bernoulli_distribution]`_`f with parameter p {\\displaystyle p} . So the probability generating function of a `F33f`_`[fair coin`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Fair_coin]`_`f, is G ( z ) = 1 2 + z 2 . {\\displaystyle G(z)={\\frac {1}{2}}+{\\frac {z}{2}}.}
• The probability generating function of a `F33f`_`[negative binomial random variable`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Negative_binomial_distribution]`_`f on { 0 , 1 , 2 ⋯ ⋯ } {\\displaystyle \\{0,1,2\\cdots \\}} , the number of failures until the r t h {\\displaystyle r^{th}} success with probability of success in each trial p {\\displaystyle p} , is G ( z ) = ( p 1 − − ( 1 − − p ) z ) r , {\\displaystyle G(z)=\\left({\\frac {p}{1-(1-p)z}}\\right)^{r},} which converges for | z | < 1 1 − − p {\\displaystyle |z|<{\\frac {1}{1-p}}} . `!Note`! that this is the r {\\displaystyle r} -fold product of the probability generating function of a `F33f`_`[geometric random variable`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Geometric_distribution]`_`f with parameter 1 − − p {\\displaystyle 1-p} on { 0 , 1 , 2 , ⋯ ⋯ } {\\displaystyle \\{0,1,2,\\cdots \\}} .
• The probability generating function of a `F33f`_`[Poisson random variable`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Poisson_distribution]`_`f with rate parameter λ λ {\\displaystyle \\lambda } is G ( z ) = e λ λ ( z − − 1 ) . {\\displaystyle G(z)=e^{\\lambda (z-1)}.}

>>Related concepts

The probability generating function is an example of a `F33f`_`[generating function`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Generating_function]`_`f of a sequence: see also `F33f`_`[formal power series`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Formal_power_series]`_`f. It is equivalent to, and sometimes called, the `F33f`_`[z-transform`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Z-transform]`_`f of the probability mass function.

Other generating functions of random variables include the `F33f`_`[moment-generating function`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Moment-generating_function]`_`f, the `F33f`_`[characteristic function`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Characteristic_function_(probability_theory)]`_`f and the `F33f`_`[cumulant generating function`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Cumulant_generating_function]`_`f. The probability generating function is also equivalent to the `F33f`_`[factorial moment generating function`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Factorial_moment_generating_function]`_`f, which as E ⁡ ⁡ [ z X ] {\\displaystyle \\operatorname {E} \\left[z^{X}\\right]} can also be considered for continuous and other random variables.

>>Notes

`:cite-note-1`!1.`! `F0af`_`[↑`#cite-ref-1]`_`f `:citerefgleb-gribakin`aGleb Gribakin. `*Probability and Distribution Theory`* (PDF).

>>References

• `:citerefjohnsonkotzkemp1992`aJohnson, Norman Lloyd; Kotz, Samuel; `F33f`_`[Kemp, Adrienne W.`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Adrienne_W._Kemp]`_`f (1992). `*Univariate Discrete Distributions`*. Wiley series in probability and mathematical statistics (2nd ed.). New York: J. Wiley & Sons. `F33f`_`[ISBN`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=ISBN_(identifier)]`_`f 978-0-471-54897-3.

`c`F0af`_`[↑ Back to top`#top]`_`f`a